
** CODE TO BRING IN DATA AS MULTIPLY IMPUTED IN REQUIRED - FOR DATASET WITH COVARIATES **

use MI_COVAR_ALL.dta, clear

mi import wide, imputed  ///
( ///
poll_ = _1_ipoll _2_ipoll _3_ipoll _4_ipoll _5_ipoll _6_ipoll _7_ipoll _8_ipoll _9_ipoll _10_ipoll _11_ipoll _12_ipoll _13_ipoll _14_ipoll _15_ipoll _16_ipoll _17_ipoll _18_ipoll _19_ipoll _20_ipoll _21_ipoll _22_ipoll _23_ipoll _24_ipoll _25_ipoll _26_ipoll _27_ipoll _28_ipoll _29_ipoll _30_ipoll _31_ipoll _32_ipoll _33_ipoll _34_ipoll _35_ipoll _36_ipoll _37_ipoll _38_ipoll _39_ipoll _40_ipoll _41_ipoll _42_ipoll _43_ipoll _44_ipoll _45_ipoll _46_ipoll _47_ipoll _48_ipoll _49_ipoll _50_ipoll  ///
mp_ = _1_imp _2_imp _3_imp _4_imp _5_imp _6_imp _7_imp _8_imp _9_imp _10_imp _11_imp _12_imp _13_imp _14_imp _15_imp _16_imp _17_imp _18_imp _19_imp _20_imp _21_imp _22_imp _23_imp _24_imp _25_imp _26_imp _27_imp _28_imp _29_imp _30_imp _31_imp _32_imp _33_imp _34_imp _35_imp _36_imp _37_imp _38_imp _39_imp _40_imp _41_imp _42_imp _43_imp _44_imp _45_imp _46_imp _47_imp _48_imp _49_imp _50_imp  ///
mcomp_ = _1_imc _2_imc _3_imc _4_imc _5_imc _6_imc _7_imc _8_imc _9_imc _10_imc _11_imc _12_imc _13_imc _14_imc _15_imc _16_imc _17_imc _18_imc _19_imc _20_imc _21_imc _22_imc _23_imc _24_imc _25_imc _26_imc _27_imc _28_imc _29_imc _30_imc _31_imc _32_imc _33_imc _34_imc _35_imc _36_imc _37_imc _38_imc _39_imc _40_imc _41_imc _42_imc _43_imc _44_imc _45_imc _46_imc _47_imc _48_imc _49_imc _50_imc  ///
papp_ = _1_ipap _2_ipap _3_ipap _4_ipap _5_ipap _6_ipap _7_ipap _8_ipap _9_ipap _10_ipap _11_ipap _12_ipap _13_ipap _14_ipap _15_ipap _16_ipap _17_ipap _18_ipap _19_ipap _20_ipap _21_ipap _22_ipap _23_ipap _24_ipap _25_ipap _26_ipap _27_ipap _28_ipap _29_ipap _30_ipap _31_ipap _32_ipap _33_ipap _34_ipap _35_ipap _36_ipap _37_ipap _38_ipap _39_ipap _40_ipap _41_ipap _42_ipap _43_ipap _44_ipap _45_ipap _46_ipap _47_ipap _48_ipap _49_ipap _50_ipap  ///
leader_ = _1_ildr _2_ildr _3_ildr _4_ildr _5_ildr _6_ildr _7_ildr _8_ildr _9_ildr _10_ildr _11_ildr _12_ildr _13_ildr _14_ildr _15_ildr _16_ildr _17_ildr _18_ildr _19_ildr _20_ildr _21_ildr _22_ildr _23_ildr _24_ildr _25_ildr _26_ildr _27_ildr _28_ildr _29_ildr _30_ildr _31_ildr _32_ildr _33_ildr _34_ildr _35_ildr _36_ildr _37_ildr _38_ildr _39_ildr _40_ildr _41_ildr _42_ildr _43_ildr _44_ildr _45_ildr _46_ildr _47_ildr _48_ildr _49_ildr _50_ildr  ///
ics_ = _1_iic _2_iic _3_iic _4_iic _5_iic _6_iic _7_iic _8_iic _9_iic _10_iic _11_iic _12_iic _13_iic _14_iic _15_iic _16_iic _17_iic _18_iic _19_iic _20_iic _21_iic _22_iic _23_iic _24_iic _25_iic _26_iic _27_iic _28_iic _29_iic _30_iic _31_iic _32_iic _33_iic _34_iic _35_iic _36_iic _37_iic _38_iic _39_iic _40_iic _41_iic _42_iic _43_iic _44_iic _45_iic _46_iic _47_iic _48_iic _49_iic _50_iic ///
gdp_ = _1_igdp _2_igdp _3_igdp _4_igdp _5_igdp _6_igdp _7_igdp _8_igdp _9_igdp _10_igdp _11_igdp _12_igdp _13_igdp _14_igdp _15_igdp _16_igdp _17_igdp _18_igdp _19_igdp _20_igdp _21_igdp _22_igdp _23_igdp _24_igdp _25_igdp _26_igdp _27_igdp _28_igdp _29_igdp _30_igdp _31_igdp _32_igdp _33_igdp _34_igdp _35_igdp _36_igdp _37_igdp _38_igdp _39_igdp _40_igdp _41_igdp _42_igdp _43_igdp _44_igdp _45_igdp _46_igdp _47_igdp _48_igdp _49_igdp _50_igdp  ///
une_ = _1_iune _2_iune _3_iune _4_iune _5_iune _6_iune _7_iune _8_iune _9_iune _10_iune _11_iune _12_iune _13_iune _14_iune _15_iune _16_iune _17_iune _18_iune _19_iune _20_iune _21_iune _22_iune _23_iune _24_iune _25_iune _26_iune _27_iune _28_iune _29_iune _30_iune _31_iune _32_iune _33_iune _34_iune _35_iune _36_iune _37_iune _38_iune _39_iune _40_iune _41_iune _42_iune _43_iune _44_iune _45_iune _46_iune _47_iune _48_iune _49_iune _50_iune  ///
) 

mi register regular vote_
mi xtset, clear 

mi set M = 50

drop if daysbeforeED>200
gen _parXcou_ = countryid+(partyid/100)

keep if pollcycle>199

save MI_COVAR_ALL.dta, replace
